﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using VisionLibrary.Filters;

namespace VisionApplication
{
    class ColorDirections: VisionAlgorithm
    {
        public int[,] Directions;
       
        public ColorDirections(String name, string[] required)
            : base(name, required)
        {
            
        }

        public override System.Drawing.Bitmap DoAlgorithm(System.Drawing.Bitmap sourceImage, Object obj)
        {
            if (obj == null)
            {
                Console.WriteLine("Application Could not find a DirectionMap");
                return sourceImage;
            }
            Bitmap returnImage = new Bitmap(sourceImage);
            Directions =  (int[,]) obj;

            VisionLibrary.Filters.ColorDirections.applyFilter(returnImage, Directions);
            
            this.Image = returnImage;
            return returnImage;

        }
    }
}
